<template>
  <ArtListCart :ratRecList="ratRecList"></ArtListCart>
</template>


<script lang="ts">
import {defineComponent, ref} from 'vue';
import ArtListCart from "../../../components/ArtListCart.vue"
import request from "@/utils/request";

export default defineComponent({
  //展示首页推荐位的文章
  name: 'Main',
  //接收父级组件传进来的参数
  props:[
  ],
  setup(){
    let ratRecList = ref({})
    const getRec = () =>{
      request.post("artRec",{}).then((res:any)=>{
        if (res.code == 200) {
          ratRecList.value = res.data
        }
      })
    }
    return {
      ratRecList,
      getRec,
      ArtListCart
    }
  },
  beforeCreate() {
    this.getRec()
  }
});
</script>

<style>

</style>